package Decorator.java;

class RobotDecorator implements Robot {


    private Robot robo;

    public RobotDecorator(Robot origin) {
        this.robo = origin;
    }

    // 装饰器模式一定要保证原有的功能不能丢，
    public void doSomething() {
        robo.doSomething();
    }

    // 同时丰富新的功能
    public void doMorething() {
        robo.doSomething();
        System.out.println("dance");
    }

}
